<include file="Public:header" />
<div id="main" class="main" >
<div class="content">
<div class="title">发送消息 [ <a href="javascript:history.back()">返回列表</a> ]</div>
<div id="result" class="result none"></div>
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/Js/editor/kindeditor.js"></script> 
<script type="text/javascript"> 
    KE.show({ 
        id : 'content_1' //TEXTAREA输入框的ID 
   }); 
</script> 
<form method='post' id="form1" name="form1" action="__URL__/insert"  enctype="multipart/form-data">
<table cellpadding=3 cellspacing=3 >
<tr>
        <td class="tRight" ><span class="red">*</span>发给会员：</td>
        <td class="tLeft" >
    <empty name="_REQUEST.member_id">
            <input type="hidden" name="member_id" id="member_id" ><input class="huge" type="text" id="member_name" name="member_name" >输入两个字符以上自动提示
            <else/>
            <input type="hidden" name="member_id" id="member_id" value="{$_REQUEST.member_id}" >
            <input class="huge" type="text" id="member_name" name="member_name" value="{$_REQUEST.member_id|getModelName=Member}" readonly>
            <br /><input class="large" type="text" name="email" value="{$_REQUEST.email}">
    </empty>
            </td>
</tr>
<tr> 
	<td class="tRight tTop">内容：</td>
	<td class="tLeft"><textarea id="content_1" name="content" style="width:700px;height:300px;"></textarea>	</td>
</tr>
     
<tr>
	<td></td>
	<td class="center"><div style="width:85%;margin:5px">
	<input type="hidden" name="status" value="1">
        <input type="hidden" name="user_id" value="<?php echo $_SESSION[C('USER_AUTH_KEY')] ?>">
        <eq name="_REQUEST.type" value="send">
            <input type="hidden" name="parent" value="0">
            <input type="hidden" name="approved" value="0">
        </eq>
        <input type="hidden" name="user_id" value="{$_SESSION.authId}" >
	<input type="submit" value="发 送"  class="button small"> <input type="reset" class="button small" onclick="resetEditor()" value="重 置" >
	</div></td>
</tr>
</table>
</form>
</div>
</div>
<script src="__PUBLIC__/Js/jquery-1.4.4.min.js"></script>
<css href="__PUBLIC__/Css/ui-base/jquery.ui.all.css" />
<script src="__PUBLIC__/Js/jquery-ui-1.8.11.custom.min.js"></script>
<!--
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
-->

<script language="JavaScript">
<!--
jQuery(document).ready(function(){
     $( "#member_name" ).autocomplete({
			source: URL+"/getAllMember",
			minLength: 1,
			select: function( event, ui ) {
				//log( ui.item ?"Selected: " + ui.item.value + " aka " + ui.item.id :"Nothing selected, input was " + this.value );
                                $('#member_id').attr('value',ui.item.id);
                    }
		});
}
);
</script>